package com.study.blog.controller;

import com.study.blog.service.LoginService;
import com.study.blog.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author 1
 * @data 2022/2/16
 */
@RestController
@RequestMapping("logout")
public class LogoutController {

    @Autowired
    private LoginService loginService;

    @GetMapping
    public Result logout(@RequestHeader("Authorization")String token) {

        return loginService.logout(token);

    }
}
